<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .tab {
            width: 500px;
            height: 500px;
            border: 1px solid #000;
            margin: 50px auto;
        }

        .tab-nav {
            height: 50px;
            line-height: 50px;
            text-align: center;
        }

        .nav-item {
            float: left;
            width: 33.33%;
            border-bottom: 1px solid #000;
        }

        .current {
            background-color: #000;
            color: #fff;
        }

        .tab-page {
            position: relative;
            width: 100%;
            height: 450px;
            line-height: 450px;
            font-size: 50px;
            text-align: center;
        }

        .page-item {
            position: absolute;
            display: none;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        .active {
            display: block;
        }
    </style>
</head>

<body>
    <div class="tab">

    </div>
    <div class="defualtdata" data-id='[
    {
        "tab":"选项1" , "page" :"页面1"} ,
    {
        "tab":"选项2" , "page" :"页面2"} ,
    {
        "tab":"选项3" , "page" :"页面3"} 
           
        ]'></div>
    <script src="tpl.js"></script>
    <script src="tool.js"></script>
    <script src="tab.js"></script>
    <script>
        new Tab('.tab', '.defualtdata').init()
    </script>
</body>

</html>